package appconfig

import (
	"fmt"
	"github.com/spf13/viper"
)

type MysqlConfig struct {
	User     string
	Password string
	Host     string
	Port     int
	DbName   string
}
type AppConfig struct {
	MysqlConfig
}

var AppConf AppConfig

func InitConfig() {
	viper.SetConfigFile("../user_rpc/appconfig/dev.yaml")
	viper.ReadInConfig()
	viper.Unmarshal(&AppConf)
	fmt.Println(AppConf)
}
